\hypertarget{classCShiftRegister}{
\section{\-C\-Shift\-Register \-Class \-Reference}
\label{classCShiftRegister}\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}}
}


\-Implementation of a linear feedback shift register.  




{\ttfamily \#include $<$shift\-\_\-register.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCShiftRegister_a7f85d0451234c8e17f22ea59fea0d44b}{\-C\-Shift\-Register} ()
\item 
virtual \hyperlink{classCShiftRegister_aaafa2480f9e74975d665164272b69f61}{$\sim$\-C\-Shift\-Register} ()
\item 
bool \hyperlink{classCShiftRegister_aa9c39a7cf284f8a724b90d523791112b}{set\-Parameters} (unsigned int p\-Register\-Length, unsigned int p\-Sequence\-Length, std\-::vector$<$ unsigned int $>$ \&p\-Feedback)
\item 
bool \hyperlink{classCShiftRegister_a8136c48384cbed5f67b6d6c81877fb08}{get\-Random\-Sequence} (bool $\ast$\&p\-Sequence)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCShiftRegister_ae2a914908d32d27a3d39ec82dced98fb}{\-C\-Shift\-Register} (const \hyperlink{classCShiftRegister}{\-C\-Shift\-Register} \&)
\item 
\hyperlink{classCShiftRegister}{\-C\-Shift\-Register} \& \hyperlink{classCShiftRegister_a60e941ce058accea04580f4d759027d7}{operator=} (const \hyperlink{classCShiftRegister}{\-C\-Shift\-Register} \&)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classCShiftRegister_a30bdf324807727e36bb0a8515f92915f}{m\-Ready}
\item 
unsigned int \hyperlink{classCShiftRegister_a8ec9e898a4ea0d55bcfb6a53fb4e1d5d}{m\-Register\-Length}
\item 
unsigned int \hyperlink{classCShiftRegister_aaf1adff492a98c59faa6907ec7dae130}{m\-Sequence\-Length}
\item 
std\-::vector$<$ int $>$ \hyperlink{classCShiftRegister_a4a1615b7d2b53043b8eb55f3543e4e68}{m\-Feedback}
\item 
std\-::vector$<$ bool $>$ \hyperlink{classCShiftRegister_afac57ead40e8b20b6bceeb52737030ef}{m\-Register}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Implementation of a linear feedback shift register. 

\begin{DoxyAuthor}{\-Author}
mnutzinger
\end{DoxyAuthor}
\-Provides a random sequence of bits calcultated by the given parameters for register length, output length and feedback positions. 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCShiftRegister_a7f85d0451234c8e17f22ea59fea0d44b}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!\-C\-Shift\-Register@{\-C\-Shift\-Register}}
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{\-C\-Shift\-Register}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Shift\-Register\-::\-C\-Shift\-Register (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCShiftRegister_a7f85d0451234c8e17f22ea59fea0d44b}
\hypertarget{classCShiftRegister_aaafa2480f9e74975d665164272b69f61}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!$\sim$\-C\-Shift\-Register@{$\sim$\-C\-Shift\-Register}}
\index{$\sim$\-C\-Shift\-Register@{$\sim$\-C\-Shift\-Register}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{$\sim$\-C\-Shift\-Register}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Shift\-Register\-::$\sim$\-C\-Shift\-Register (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCShiftRegister_aaafa2480f9e74975d665164272b69f61}
\hypertarget{classCShiftRegister_ae2a914908d32d27a3d39ec82dced98fb}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!\-C\-Shift\-Register@{\-C\-Shift\-Register}}
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{\-C\-Shift\-Register}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Shift\-Register\-::\-C\-Shift\-Register (
\begin{DoxyParamCaption}
\item[{const {\bf \-C\-Shift\-Register} \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_ae2a914908d32d27a3d39ec82dced98fb}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCShiftRegister_a8136c48384cbed5f67b6d6c81877fb08}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!get\-Random\-Sequence@{get\-Random\-Sequence}}
\index{get\-Random\-Sequence@{get\-Random\-Sequence}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{get\-Random\-Sequence}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-Shift\-Register\-::get\-Random\-Sequence (
\begin{DoxyParamCaption}
\item[{bool $\ast$\&}]{p\-Sequence}
\end{DoxyParamCaption}
)}}
\label{classCShiftRegister_a8136c48384cbed5f67b6d6c81877fb08}
\-Retrieve random sequence from lfsr. \begin{DoxyNote}{\-Note}
\-: p\-Sequence has to be allocated for at least m\-Sequence\-Length elements.
\end{DoxyNote}

\begin{DoxyParams}{\-Parameters}
{\em p\-Sequence} & reference parameter to which the random sequence is stored \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
error status 
\end{DoxyReturn}
\hypertarget{classCShiftRegister_a60e941ce058accea04580f4d759027d7}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!operator=@{operator=}}
\index{operator=@{operator=}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Shift\-Register}\& \-C\-Shift\-Register\-::operator= (
\begin{DoxyParamCaption}
\item[{const {\bf \-C\-Shift\-Register} \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_a60e941ce058accea04580f4d759027d7}
\hypertarget{classCShiftRegister_aa9c39a7cf284f8a724b90d523791112b}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!set\-Parameters@{set\-Parameters}}
\index{set\-Parameters@{set\-Parameters}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{set\-Parameters}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-Shift\-Register\-::set\-Parameters (
\begin{DoxyParamCaption}
\item[{unsigned int}]{p\-Register\-Length, }
\item[{unsigned int}]{p\-Sequence\-Length, }
\item[{std\-::vector$<$ unsigned int $>$ \&}]{p\-Feedback}
\end{DoxyParamCaption}
)}}
\label{classCShiftRegister_aa9c39a7cf284f8a724b90d523791112b}
\-Set parameters for the lfsr operation.


\begin{DoxyParams}{\-Parameters}
{\em p\-Register\-Length} & desired length of the shift register \\
\hline
{\em p\-Sequence\-Length} & desired length of the random sequence \\
\hline
{\em p\-Feedback} & feedback positions \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
error status 
\end{DoxyReturn}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classCShiftRegister_a4a1615b7d2b53043b8eb55f3543e4e68}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!m\-Feedback@{m\-Feedback}}
\index{m\-Feedback@{m\-Feedback}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{m\-Feedback}]{\setlength{\rightskip}{0pt plus 5cm}std\-::vector$<$int$>$ {\bf \-C\-Shift\-Register\-::m\-Feedback}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_a4a1615b7d2b53043b8eb55f3543e4e68}
feedback positions \hypertarget{classCShiftRegister_a30bdf324807727e36bb0a8515f92915f}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!m\-Ready@{m\-Ready}}
\index{m\-Ready@{m\-Ready}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{m\-Ready}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-C\-Shift\-Register\-::m\-Ready}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_a30bdf324807727e36bb0a8515f92915f}
indicates whether the lfsr is ready for operation \hypertarget{classCShiftRegister_afac57ead40e8b20b6bceeb52737030ef}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!m\-Register@{m\-Register}}
\index{m\-Register@{m\-Register}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{m\-Register}]{\setlength{\rightskip}{0pt plus 5cm}std\-::vector$<$bool$>$ {\bf \-C\-Shift\-Register\-::m\-Register}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_afac57ead40e8b20b6bceeb52737030ef}
the internal register \hypertarget{classCShiftRegister_a8ec9e898a4ea0d55bcfb6a53fb4e1d5d}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!m\-Register\-Length@{m\-Register\-Length}}
\index{m\-Register\-Length@{m\-Register\-Length}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{m\-Register\-Length}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Shift\-Register\-::m\-Register\-Length}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_a8ec9e898a4ea0d55bcfb6a53fb4e1d5d}
length of the register \hypertarget{classCShiftRegister_aaf1adff492a98c59faa6907ec7dae130}{
\index{\-C\-Shift\-Register@{\-C\-Shift\-Register}!m\-Sequence\-Length@{m\-Sequence\-Length}}
\index{m\-Sequence\-Length@{m\-Sequence\-Length}!CShiftRegister@{\-C\-Shift\-Register}}
\subsubsection[{m\-Sequence\-Length}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Shift\-Register\-::m\-Sequence\-Length}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCShiftRegister_aaf1adff492a98c59faa6907ec7dae130}
length of the output sequence 

\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{shift__register_8h}{shift\-\_\-register.\-h}\item 
\hyperlink{shift__register_8cxx}{shift\-\_\-register.\-cxx}\end{DoxyCompactItemize}
